package javatuning.ch3.teststr;

import java.util.ArrayList;
import java.util.List;
import java.util.UUID;

/**
 * use JDK 10 
 * -Xmx64m -XX:-CompactStrings
 *     540000
 * -Xmx64m -XX:+CompactStrings
 *     760000
 * @author Administrator
 *
 */
public class StringCompact {
	static List<String> strings = new ArrayList<>();
	public static void main(String[] args) {
		int i = 0;
		for(;;i++) {
			strings.add(UUID.randomUUID().toString());
			if(i%10000==0) {
				System.out.println(i);
			}
		}
	}
}
